# -*- coding: utf-8 -*-
# @Time : 2022/4/9 19:49
# @Author : Liuqing
# @File : 04_字节大小计算.py
# @Software : PyCharm

def byte_size(string):
    return len(string.encode('utf-8'))


if __name__ == '__main__':
    print(byte_size('weixiao'))
    print(byte_size('您好'))